package com.lbj.composeapp

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import com.lbj.composeapp.ui.theme.ComposeAPPTheme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            //Text("Hello,Compose")
            MessageCode(name = "Compose")
        }
    }
}

@Composable
fun MessageCode(name:String){
    Text("Hello, $name",
    color = Color.Red)
}

@Preview
@Composable
fun PreviewMessageCode(){
    MessageCode(name = "Compose")
}

